package com.lht.testDemo;

import org.junit.Test;

/**
 * @author Eric
 * @version 1.0
 * @date 2019-06-14
 */
public class MyCompare implements Comparable<MyCompare> {

    private Integer curIndex;

    private Integer index;


    public Integer getCurIndex() {
        return curIndex;
    }

    public void setCurIndex(Integer curIndex) {
        this.curIndex = curIndex;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    @Override
    public int compareTo(MyCompare o) {
        return this.curIndex-o.curIndex;
    }


    @Test
    public void test(){
        int a=8;
        System.out.println(a & (-a));
    }

}
